<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>客服支持 | BRUTAL TOYS | 粗野主义潮玩</title>
    <style>
        /* 基础重置与粗野主义风格变量 */
        :root {
            --concrete: #7D7D7D;
            --concrete-light: #9E9E9E;
            --concrete-dark: #616161;
            --accent: #FF5252;
            --accent-dark: #E53935;
            --text: #212121;
            --text-light: #757575;
            --chat-user-bg: #FF5252;
            --chat-agent-bg: #E0E0E0;
            --chat-agent-text: #212121;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: #f5f5f5;
            color: var(--text);
            line-height: 1.6;
            background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23f5f5f5'/%3E%3Cpath d='M0 0v100M20 0v100M40 0v100M60 0v100M80 0v100M100 0v100M0 0h100M0 20h100M0 40h100M0 60h100M0 80h100M0 100h100' stroke='%23e0e0e0' stroke-width='1' fill='none'/%3E%3C/svg%3E");
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .concrete-bg {
            background-color: var(--concrete);
            background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            color: white;
            border: 2px solid var(--concrete-dark);
            box-shadow: 8px 8px 0 var(--concrete-dark);
        }

        /* 布局组件 */
        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            flex: 1;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 30px 0;
            margin-bottom: 20px;
        }

        .logo {
            font-size: 2.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: -2px;
            color: var(--text);
        }

        .logo span {
            color: var(--accent);
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav li {
            margin-left: 30px;
        }

        nav a {
            text-decoration: none;
            color: var(--text);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 1.1rem;
            position: relative;
            padding: 5px 0;
        }

        nav a:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 3px;
            background-color: var(--accent);
            transition: width 0.3s;
        }

        nav a:hover:after {
            width: 100%;
        }

        /* 聊天界面样式 */
        .chat-container {
            display: flex;
            flex-direction: column;
            height: calc(100vh - 200px);
            max-height: 700px;
            background: white;
            border: 3px solid var(--text);
            box-shadow: 10px 10px 0 var(--concrete-dark);
            margin-bottom: 60px;
        }

        .chat-header {
            padding: 20px;
            background: var(--concrete);
            color: white;
            border-bottom: 3px solid var(--text);
            display: flex;
            align-items: center;
        }

        .chat-header-icon {
            width: 40px;
            height: 40px;
            background: var(--accent);
            border: 2px solid var(--accent-dark);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            font-weight: bold;
        }

        .chat-header-title {
            font-size: 1.5rem;
            font-weight: 700;
            text-transform: uppercase;
        }

        .chat-header-status {
            margin-left: auto;
            display: flex;
            align-items: center;
            font-size: 0.9rem;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            background: #4CAF50;
            border-radius: 50%;
            margin-right: 8px;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .message {
            max-width: 70%;
            padding: 15px;
            border: 2px solid var(--text);
            position: relative;
        }

        .message-user {
            align-self: flex-end;
            background: var(--chat-user-bg);
            color: white;
            box-shadow: 5px 5px 0 var(--accent-dark);
            margin-left: 30%;
        }

        .message-agent {
            align-self: flex-start;
            background: var(--chat-agent-bg);
            color: var(--chat-agent-text);
            box-shadow: 5px 5px 0 var(--concrete-light);
        }

        .message-time {
            font-size: 0.7rem;
            margin-top: 5px;
            opacity: 0.8;
            text-align: right;
        }

        .agent-info {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }

        .agent-avatar {
            width: 30px;
            height: 30px;
            background: var(--concrete);
            border: 2px solid var(--text);
            margin-right: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.8rem;
        }

        .agent-name {
            font-weight: 700;
            font-size: 0.9rem;
        }

        .chat-input-container {
            display: flex;
            padding: 15px;
            border-top: 3px solid var(--text);
            background: var(--concrete-light);
            gap: 10px;
        }

        .chat-input {
            flex: 1;
            padding: 15px;
            border: 2px solid var(--text);
            font-family: inherit;
            font-size: 1rem;
            resize: none;
            min-height: 60px;
            box-shadow: 3px 3px 0 var(--concrete-dark);
        }

        .chat-input:focus {
            outline: none;
            box-shadow: 1px 1px 0 var(--concrete-dark);
            transform: translate(2px, 2px);
        }

        .chat-send {
            padding: 0 25px;
            background: var(--accent);
            color: white;
            border: 2px solid var(--accent-dark);
            cursor: pointer;
            font-weight: bold;
            text-transform: uppercase;
            box-shadow: 5px 5px 0 var(--accent-dark);
            transition: all 0.3s;
        }

        .chat-send:hover {
            transform: translate(3px, 3px);
            box-shadow: 2px 2px 0 var(--accent-dark);
        }

        /* 快速问题区域 */
        .quick-questions {
            padding: 20px;
            border-top: 3px solid var(--text);
            background: white;
        }

        .quick-questions-title {
            font-size: 1rem;
            margin-bottom: 15px;
            text-transform: uppercase;
            font-weight: 700;
            color: var(--text);
        }

        .quick-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .quick-btn {
            padding: 8px 15px;
            background: var(--concrete-light);
            border: 2px solid var(--text);
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s;
        }

        .quick-btn:hover {
            background: var(--accent);
            color: white;
            transform: translate(3px, 3px);
            box-shadow: 3px 3px 0 var(--accent-dark);
        }

        /* 页脚 */
        footer {
            padding: 40px 0;
            text-align: center;
            margin-top: auto;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        .footer-links a {
            margin: 0 15px 10px;
            color: var(--text);
            text-decoration: none;
            font-weight: 600;
        }

        .social-icons {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
        }

        .social-icons a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            background-color: var(--text);
            color: white;
            margin: 0 10px;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s;
        }

        .social-icons a:hover {
            transform: translateY(-5px);
            background-color: var(--accent);
        }

        .copyright {
            color: var(--text-light);
        }

        /* 响应式设计 */
        @media (max-width: 900px) {
            .message {
                max-width: 85%;
            }

            nav ul {
                flex-wrap: wrap;
            }

            nav li {
                margin: 0 15px 10px 0;
            }
        }

        @media (max-width: 600px) {
            header {
                flex-direction: column;
                text-align: center;
            }

            .logo {
                margin-bottom: 20px;
            }

            nav ul {
                justify-content: center;
            }

            .chat-container {
                height: calc(100vh - 150px);
            }

            .message {
                max-width: 90%;
            }

            .message-user {
                margin-left: 10%;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <header>
            <div class="logo">BRUTAL<span>TOYS</span></div>
            <nav>
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="product_list_2.html">产品</a></li>
                    <li><a href="news.html">新闻</a></li>
                    <li><a href="about.html">关于</a></li>
                    <li><a href="contact.html" style="color: var(--accent);">联系</a></li>
                </ul>
            </nav>
        </header>

        <div class="chat-container">
            <div class="chat-header">
                <div class="chat-header-icon">BT</div>
                <div class="chat-header-title">BRUTAL TOYS 客服支持</div>
                <div class="chat-header-status">
                    <div class="status-indicator"></div>
                    <span>在线</span>
                </div>
            </div>

            <div class="chat-messages">
                <div class="message message-agent">
                    <div class="agent-info">
                        <div class="agent-avatar">M</div>
                        <div class="agent-name">墨墨</div>
                    </div>
                    <p>您好！欢迎来到BRUTAL TOYS客服中心。我是墨墨，有什么可以帮您的吗？</p>
                    <div class="message-time">10:00</div>
                </div>

                <div class="message message-user">
                    <p>你好，我想咨询一下"几何兽-灰烬"这款产品的库存情况。</p>
                    <div class="message-time">10:02</div>
                </div>

                <div class="message message-agent">
                    <div class="agent-info">
                        <div class="agent-avatar">M</div>
                        <div class="agent-name">墨墨</div>
                    </div>
                    <p>感谢您的咨询！目前"几何兽-灰烬"库存充足。您是想了解具体尺寸还是购买相关事宜？</p>
                    <div class="message-time">10:03</div>
                </div>

                <div class="message message-user">
                    <p>我想知道它的具体尺寸和重量，还有国际配送需要多久？</p>
                    <div class="message-time">10:04</div>
                </div>

                <div class="message message-agent">
                    <div class="agent-info">
                        <div class="agent-avatar">M</div>
                        <div class="agent-name">墨墨</div>
                    </div>
                    <p>"几何兽-灰烬"尺寸为高25cm x 宽18cm x 深12cm，重量约2.3kg。国际配送通常需要7-14个工作日，具体取决于目的地国家。</p>
                    <div class="message-time">10:05</div>
                </div>
            </div>

            <div class="quick-questions">
                <div class="quick-questions-title">快速问题:</div>
                <div class="quick-buttons">
                    <button class="quick-btn">订单状态查询</button>
                    <button class="quick-btn">退换货政策</button>
                    <button class="quick-btn">产品保养指南</button>
                    <button class="quick-btn">限量版预订</button>
                </div>
            </div>

            <div class="chat-input-container">
                <textarea class="chat-input" placeholder="输入您的问题..." rows="1"></textarea>
                <button class="chat-send">发送</button>
            </div>
        </div>
    </div>

    <footer>
        <div class="container">
            <div class="footer-links">
                <a href="privacy.html">隐私政策</a>
                <a href="terms.html">条款条件</a>
                <a href="guide.html">购买指南</a>
                <a href="delivery.html">配送信息</a>
                <a href="help.html">帮助中心</a>
                <a href="contact.html">联系我们</a>
            </div>
            <div class="social-icons">
                <a href="#">IG</a>
                <a href="#">TW</a>
                <a href="#">FB</a>
                <a href="#">YT</a>
            </div>
            <p class="copyright">© 2023 BRUTAL TOYS. 保留所有权利。</p>
        </div>
    </footer>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            const chatMessages = document.querySelector('.chat-messages');
            const chatInput = document.querySelector('.chat-input');
            const chatSend = document.querySelector('.chat-send');
            const quickButtons = document.querySelectorAll('.quick-btn');

            // 自动滚动到底部
            chatMessages.scrollTop = chatMessages.scrollHeight;

            // 发送消息函数
            function sendMessage() {
                const message = chatInput.value.trim();
                if (message) {
                    const messageElement = document.createElement('div');
                    messageElement.classList.add('message', 'message-user');

                    const now = new Date();
                    const timeString = now.getHours() + ':' + String(now.getMinutes()).padStart(2, '0');

                    messageElement.innerHTML = `
                        <p>${message}</p>
                        <div class="message-time">${timeString}</div>
                    `;

                    chatMessages.appendChild(messageElement);
                    chatInput.value = '';

                    // 自动滚动到底部
                    chatMessages.scrollTop = chatMessages.scrollHeight;

                    // 模拟客服回复
                    setTimeout(() => {
                        const agentMessage = document.createElement('div');
                        agentMessage.classList.add('message', 'message-agent');

                        agentMessage.innerHTML = `
                            <div class="agent-info">
                                <div class="agent-avatar">M</div>
                                <div class="agent-name">墨墨</div>
                            </div>
                            <p>感谢您的留言！我会尽快为您解答。</p>
                            <div class="message-time">${timeString}</div>
                        `;

                        chatMessages.appendChild(agentMessage);
                        chatMessages.scrollTop = chatMessages.scrollHeight;
                    }, 1000);
                }
            }

            // 发送按钮点击事件
            chatSend.addEventListener('click', sendMessage);

            // 按Enter发送消息
            chatInput.addEventListener('keypress', function (e) {
                if (e.key === 'Enter' && !e.shiftKey) {
                    e.preventDefault();
                    sendMessage();
                }
            });

            // 快速问题按钮点击事件
            quickButtons.forEach(button => {
                button.addEventListener('click', function () {
                    chatInput.value = this.textContent + ' ';
                    chatInput.focus();
                });
            });

            // 自动调整文本区域高度
            chatInput.addEventListener('input', function () {
                this.style.height = 'auto';
                this.style.height = (this.scrollHeight) + 'px';
            });
        });
    </script>
</body>

</html>